/**
 * @Description:userReducer
 * @author TangYong
 * @date 2022/5/3
 */
const userReducer = (state = {token: "token"}, action) => {
    switch (action.type) {
        case 'Set_Token':
            let newState = {...state};
            newState.token = action.token;
            state.token=action.token;
            return newState;
        // case 'Set_User':
        //     let newUser = {...state};
        //     newUser.user = action.user;
        //     state.user=action.user;
        //     return newUser;
        default:
            return state
    }
}



export default userReducer
